// 加载HTML模板
async function loadTemplate() {
    const response = await fetch('components/tools-grid.html');
    return await response.text();
}

export async function initToolsGrid() {
    const template = await loadTemplate();
    document.getElementById('toolsGridContainer').innerHTML = template;
    
    // 添加事件监听器
    document.getElementById('jsonTool').addEventListener('click', () => {
        document.getElementById('jsonModal').style.display = 'block';
    });
    
    document.getElementById('imageTool').addEventListener('click', () => {
        document.getElementById('imageModal').style.display = 'block';
    });
} 